package com.insightg3.android;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;


public class KakakuSearch extends TabActivity  {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);        
        setContentView(R.layout.main_tab);
        
        Resources res = getResources(); // Resource object to get Drawables
        TabHost tabHost = getTabHost();  // The activity TabHost
        TabHost.TabSpec spec;  // Resusable TabSpec for each tab
        Intent intent;  // Reusable Intent for each tab
        
//        tabHost.addTab(tabHost.newTabSpec("tab_test1").setIndicator("TAB 1").setContent(R.id.EditText01));

        intent = new Intent().setClass(this, QuickSearchActivity.class);
        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("quick").setIndicator("Quick",
                          res.getDrawable(R.drawable.ic_tab_quick))
                      .setContent(intent);
        tabHost.addTab(spec);


        intent = new Intent().setClass(this, AdvanceSearchActivity.class);
        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("advance").setIndicator("Advance",
                          res.getDrawable(R.drawable.ic_tab_advance))
                      .setContent(intent);
        tabHost.addTab(spec);

        /*
        setContentView(R.layout.main);
        
        Spinner spinner = (Spinner)findViewById(R.id.Spinner01);
        
        ArrayAdapter adapter = ArrayAdapter.createFromResource(
                this, R.array.value_where, android.R.layout.simple_spinner_item);
        
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        
        spinner.setAdapter(adapter);
        */
        
        tabHost.setCurrentTab(0);
    }
}